1. Field of the Invention
The present invention relates in general to improved data storage systems and in particular to an improved method and system for updating stored data in a data storage system. Still more particularly, the present invention relates to an improved method and system for increasing performance of a data storage system in updating stored data utilizing contiguous data in a cache associated with the data storage system.
2. Description of the Related Art
As the performance of microprocessor and semiconductor memory technology increases, there is a need for improved data storage systems with comparable performance enhancements. Additionally, in enhancing the performance of data storage systems, there is a need for improved reliability of data stored. In 1988, a paper was published by Patterson, Gibson, Katz, A Case for Redundant Arrays of Inexpensive Disks (RAID), International Conference on Management of Data, pgs. 109-116, June 1988. This paper laid the foundation for the use of redundant arrays of inexpensive disks that would not only improve the data transfer rate and data I/O rate over a comparable single disk access, but would also provide error correction at a lower cost in data storage systems.
RAID includes an array of disks which are typically viewed by a host, such as a computer system, as a single disk. A RAID controller may be a hardware and/or software tool for providing an interface between the host and the array of disks. Preferably, the RAID controller manages the array of disks for storage and retrieval and can view the disks of the RAID separately. The disks included in the array may be any type of data storage systems which can be controlled by the RAID controller when grouped in the array.
The RAID controller is typically configured to access the array of disks as defined by a particular "RAID level." The RAID level specifies how the data is distributed across the disk drives and how error correction is accomplished. In the paper noted above, the authors describe five RAID levels (RAID Level 1-RAID level 5). Since the publication of the paper, additional RAID levels have been designated.
RAID levels are typically distinguished by the benefits included. Three key benefits which may be included in a RAID level are fault tolerance, data availability and high performance. Fault tolerance is typically achieved through an error correction method which ensures that information can be reconstructed in the event of a disk failure. Data availability allows the data array to continue to operate with a failed component. Typically, data availability is achieved through a method of redundancy. Finally, high performance is typically achieved by simultaneous access to multiple disk drives which results in faster I/O and data transfer requests.
Error correction is accomplished, in many RAID levels, by utilizing additional parity data stored with the original data. Parity data may be utilized to recover lost data due to disk failure. Parity data is typically stored on one or more disks dedicated for error correction only, or distributed over all of the disks within an array.
By the method of redundancy, data is stored in multiple disks of the array. Redundancy is a benefit in that redundant data allows the storage system to continue to operate with a failed component while data is being replaced through the error correction method. Additionally, redundant data is more beneficial than back-up data because back-up data is typically outdated when needed whereas redundant data is current when needed.
In many RAID levels, redundancy is incorporated through data interleaving which distributes the data over all of the data disks in the array. Data interleaving is usually in the form of data "striping" in which data to be stored is broken down into blocks called "stripe units" which are then distributed across the array of disks. Stripe units are typically predefined as a bit; byte, block or other unit. Stripe units are further broken into a plurality of sectors where all sectors are an equivalent size. A "stripe" is a group of corresponding stripe units, one stripe unit from each disk in the array. Thus, "stripe size" is equal to the size of a stripe unit times the number of data disks in the array.
In an example, RAID level 5 utilizes data interleaving by striping data across all disks and provides for error correction by distributing parity data across all disks. For each stripe, all stripe units are logically combined with each of the other stripe units to calculate parity for the stripe. Logical combination is typically accomplished by an exclusive or (XOR) of the stripe units. For N physical drives, N-1 of the physical drives will receive a stripe unit for the stripe and the Nth physical drive will receive the parity for the stripe. For each stripe, the physical drive receiving the parity data rotates such that all parity data is not contained on a single disk. I/O request rates for RAID level 5 are high because the distribution of parity data allows the system to perform multiple read and write functions at the same time. RAID level 5 offers high performance, data availability and fault tolerance for the data disks.
Disk arrays are preferably configured to include logical drives which divide the physical drives in the disk array into logical components which may be viewed by the host as separate drives. Each-logical drive includes a cross section of each of the physical drives and is assigned a RAID level. For example, a RAID system may include 10 physical drives in the array. The RAID system is accessible by a network of 4 users and it is desirable that each of the users have separate storage on the disk array. Therefore the physical drives will be divided into at least four logical drives where each user has access to one of the logical drives. Logical drive 1 needs to be configured to RAID level 5. Therefore, data will be interleaved across the cross sections of nine of the physical drives utilized by logical drive 1 and parity data will be stored in the cross section of the remaining physical drive.
A host computer may provide data to the data storage system. The data is preferably received into a cache of the RAID controller. When data is received into the cache, the RAID controller may return a signal to the host computer that the data has been received even though the data has not been stored in the physical drives of the data storage system. By receiving data into the cache before storage as stripes in the data storage system, the performance of the data storage system may be enhanced.
Data for updating previously stored data is considered "dirty data" until the dirty data is written to the data disks. The dirty data in the cache may include sufficient data to completely update at least one stripe or may include portions of data to update portions of multiple stripes. Each data stripe unit of dirty data is contained within a page of the cache.
Before dirty data may be written to the data disks, parity data for the stripe, which includes the dirty data, must be calculated to maintain error correction. By one method, for each new page of dirty data, the old stripe unit and parity for the stripe must be fetched from the data disks into pages of the cache, the parity calculated and the dirty stripe unit and parity written to the appropriate physical drives for the stripe. For most parity calculation methods, two reads are required from the stripe to fetch the necessary data into pages of the cache. Thereafter, for writing to the data disks, the dirty data and newly calculated parity data utilize two writes for each page of dirty data. Regardless of the existence of other data in the cache, in the prior art, each page of dirty data is written independently.
However, if all dirty data for a complete stripe is in the cache, all the data needed to calculate new parity is already in the cache.
It should therefore be apparent that a need exists for an improved method and system which permits updating of data stripes with a minimum number of input/output operations by considering whether or not related data is present within the cache.